package com.taha.mail.controller;

import java.io.IOException;

import javax.servlet.Servlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class RegisterPageController extends HttpServlet implements Servlet{
	
	protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException
            {
		String notfilled=request.getParameter("notfilled");
		request.getSession().setAttribute("notfilled", notfilled);
		
		String dontMatch=request.getParameter("dontMatch");
		request.getSession().setAttribute("dontMatch", dontMatch);
		
        
		String registering_failed=request.getParameter("registering_failed");
		request.getSession().setAttribute("registering_failed", registering_failed);
		
		String pass_TooShort=request.getParameter("pass_TooShort");
		request.getSession().setAttribute("pass_TooShort", pass_TooShort);
		
		//by mahdiye
		String UserNameAvailability=request.getParameter("UserNameAvailability");
		request.getSession().setAttribute("UserNameAvailability", UserNameAvailability);
		
		getServletContext().getRequestDispatcher("/WEB-INF/jsp/CreateAccount.jsp").forward(request, response);
		
		
            }
	 protected void doGet(HttpServletRequest request, HttpServletResponse response)
		        throws ServletException, IOException
		        {
		            doPost(request,response);
		        }
}
